﻿using SYMetro.DataObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YiDa.Infrastructure;

namespace SYMetro.ServiceContract.Membership
{
    public interface IUserService: IApplicationServiceContract
    {
        UserDataObjectList CreateUser(MembershipConfigDataObject config, UserDataObjectList users);

        bool DeleteUser(string username);

        bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer);

        string GetPassword(string username, string passwordAnswer);

        bool ChangePassword(MembershipConfigDataObject config, string username, string oldPassword, string newPassword);

        string ResetPassword(MembershipConfigDataObject config, string username, string passwordAnswer);

        bool UpdateUser(MembershipConfigDataObject config, UserDataObjectList users);

        bool ValidateUser(string username, string password);

        bool UnlockUser(string username);

        UserDataObject GetUser(Guid Id, bool userIsOnline);

        UserDataObject GetUser(string username, bool userIsOnline);

        UserDataObject GetUserNameByEmail(string email);

        UserDataObjectList GetAllUsers();

        int GetNumberOfUsersOnline(MembershipConfigDataObject config);

        UserDataObjectList FindUsersByName(string usernameToMatch);

        UserDataObjectList FindUsersByEmail(string emailToMatch);

        string GeneratePassword(MembershipConfigDataObject config);
    }
}
